// fingerColors.js
export function getFingerClass(letter) {
  const fingerZones = {
    leftPinky: ['q', 'a', 'z'],
    leftRing: ['w', 's', 'x'],
    leftMiddle: ['e', 'd', 'c'],
    leftIndex: ['r', 't', 'f', 'g', 'v', 'b'],
    rightIndex: ['y', 'u', 'h', 'j', 'n', 'm'],
    rightMiddle: ['i', 'k'],
    rightRing: ['o', 'l'],
    rightPinky: ['p']
  }

  const lowerLetter = letter.toLowerCase()

  if (fingerZones.leftPinky.includes(lowerLetter)) {
    return '#ff6666'
  } else if (fingerZones.leftRing.includes(lowerLetter)) {
    return '#ff9966'
  } else if (fingerZones.leftMiddle.includes(lowerLetter)) {
    return '#ffcc66'
  } else if (fingerZones.leftIndex.includes(lowerLetter)) {
    return '#99cc66'
  } else if (fingerZones.rightIndex.includes(lowerLetter)) {
    return '#66ccff'
  } else if (fingerZones.rightMiddle.includes(lowerLetter)) {
    return '#6699ff'
  } else if (fingerZones.rightRing.includes(lowerLetter)) {
    return '#9966ff'
  } else if (fingerZones.rightPinky.includes(lowerLetter)) {
    return '#cc66ff'
  } else {
    return 'gray' // 对于空格和标点符号
  }
}
